/**
 * Created by Administrator on 17-10-28.
 */
var  room=require('./room_d89');
var core_d89=require("./core_d89");
var  iconst=require('./iconst');
core_d89=new core_d89();
var     P = require("bluebird");

room.prototype.onIdleRelease=function()
{

}

room.prototype.waitReadyEndRelease=function()
{

}

room.prototype.waitBettingEndRelease=function()
{

}

room.prototype.showGameResultEndRelease=function()
{

}

room.prototype.nobodyActiveEnd=function()
{
    var  list=this.get('userList');
    var  len=list.length;
    var  count=0;
    for(var i=0;i<len;i++)
    {   var  u=list[i];
        if(u.online==1)
        { count++;}
    }
    if(count==0)
    {
        console.logr(this.roomPsw,'nobodyActiveEnd');
        var  gamingCount=this.get('gamingCount');
        if(gamingCount==0&&this.roomPsw)
        {
            console.logr(this.roomPsw,'没有玩家开始过游戏，退还房卡');
            this.returnOrnerCard();
        }
        this.set('releaseRoom',1);
        this.gameOver();
        console.logr(this.roomPsw,'超时没有玩家在游戏自动解散房间');
        //this.destroyRoom();
    }
}
